package myPackage.participant.dao;

import myPackage.participant.domain.History;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;

@Repository
public class HistoryDao {
    @Autowired
    private HibernateTemplate hibernateTemplate;

    public List<History> listAllHistorys() {
        return hibernateTemplate.loadAll(History.class);
    }

    public void insert(History newHistory)
    {
        hibernateTemplate.save(newHistory);
    }

    public void update(History informationUploaded) {
        hibernateTemplate.update(informationUploaded);
    }
}
